<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"> 

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title>Alterar Cliente</title>
        <link href="br.css/style.css" rel="stylesheet" type="text/css" media="screen" />
    </h:head>

    <h:body>        
        <h:form>
            <div id="corpoSite">

                <div id="cabecalho">
                    <img src="img/Logo.jpg" style="width: 400px; height: 100px; padding-top: 10px;" />
                </div>
                <div id="menu">

                </div> 
                <div id="content">
                    <div id="firstHeading">
                        <h3><strong>WabT</strong></h3></div>
                    <p:breadCrumb>  
                        <p:menuitem value="Index" action="index.xhtml" ajax="false" />
                        <p:menuitem value="Administrador" action="administrador_index.xhtml" ajax="false" />
                        <p:menuitem value="Manter Clientes" action="administrador_manter_clientes.xhtml" ajax="false" />
                        <p:menuitem value="Alterar Cliente" action="administrador_alterar_cliente.xhtml" ajax="false" />
                    </p:breadCrumb> 
                    <hr />
                    <div id="conteudo">
                        <h:form>  

                            <p:growl id="growl" showDetail="true" />  

                            <div  style="text-align: center; width: 600px; padding-left: 20%; padding-left: 20%">
                                <p:panel header="Alterar Usuáris">  
                                    <h:panelGrid cellpadding="5">
                                        <h:panelGrid columns="4" cellpadding="5" style="border: 1px dashed #000000; width: 100%">  
                                            <h:outputLabel for="username" value="Username*:" />  
                                            <p:inputText value="#{rFacesFornecedor.login}"   
                                                         id="username" required="false" label="username" size="10" />  
                                            <h:outputLabel for="password" value="Password*:" />
                                            <p:password value="#{rFacesFornecedor.senha}" minLength="2" feedback="true" id="password" required="false" label="password" size="10" validatorMessage="campo obrigatorio" />

                                        </h:panelGrid>
                                        <h:outputText value="Nome do Responsável*:"  />   
                                        <h:outputText value="#{rFacesFornecedor.responsavel}" />
                                        <h:panelGrid columns="4" cellpadding="5" style="border: 1px dashed #000000; width: 100%">                                 
                                            <h:outputText value="CPF*:" />  
                                            <h:outputText value="#{rFacesFornecedor.cpf}" />
                                            <h:outputText value="CNPJ*:" />  
                                            <h:outputText value="#{rFacesFornecedor.cnpj}" />
                                        </h:panelGrid>
                                        <h:outputText value="Nome Fantasia*:"  />   
                                        <h:outputText value="#{rFacesFornecedor.fantasia}" />  
                                        <h:outputText value="Razão Social*:" />  
                                        <h:outputText value="#{rFacesFornecedor.razaosocial}" />
                                        <h:outputText value="Inscrição Estadual*:" />  
                                        <h:outputText value="#{rFacesFornecedor.inscestadual}"  />
                                        <p:panel header="Dados de Localização">
                                            <h:panelGrid style="border: 1px solid #000066;" cellpadding="5">
                                                <h:panelGrid columns="2" cellpadding="5" >
                                                    <h:outputText value="Logradouro*:"  />   
                                                    <p:inputText value="#{rFacesFornecedor.logradouro}" required="false" label="Name" size="9" style="width: 100%;" />
                                                    <h:outputText value="Data Cadastro:"  />   
                                                    <h:outputText value="#{rFacesFornecedor.datacadastro}" />
                                                </h:panelGrid>
                                                <h:outputText value="Endereço*:" style="padding-left: 7px"  />
                                                <p:inputText value="#{rFacesFornecedor.rua}" required="false" label="Name" size="254" style="width: 95%;padding-left: 10px" />
                                                <h:panelGrid columns="4" cellpadding="5" >                      
                                                    <h:outputText value="Numero*:"  />   
                                                    <p:inputText value="#{rFacesFornecedor.numero}" required="false" label="Name" size="6" style="width: 100%;" />                                                  
                                                    <h:outputText value="Complemento:"  />   
                                                    <p:inputText value="#{rFacesFornecedor.complemento}" required="false" label="Name" size="21" style="width: 100%;" />
                                                </h:panelGrid>
                                                <h:panelGrid columns="4" cellpadding="5">
                                                    <h:outputText value="Bairro*:" />   
                                                    <p:inputText value="#{rFacesFornecedor.bairro}" required="false" label="Name" size="31" style="width: 70%;" />
                                                    <h:outputText value="Cidade*:" />   
                                                    <h:selectOneListbox size="1" value="#{rFacesFornecedor.codigocid}">
                                                        <f:selectItem itemLabel="Selecione a cidade" itemValue="#{rFacesCadastroUsuario.cidade}"  />
                                                        <f:selectItems value="#{rFacesCidades.all}" var="cidades" itemLabel="#{cidades.nome}" itemValue="#{cidades.codigocid}"  />
                                                    </h:selectOneListbox>
                                                    <h:outputText value="CEP*:"  />   
                                                    <p:inputMask value="#{rFacesFornecedor.cep}" required="false" mask="99999-999" />
                                                    <h:outputText value="Estado*:"  />
                                                    <h:selectOneListbox size="1" value="#{rFacesFornecedor.codigoest}">
                                                        <f:selectItem itemLabel="Selecione a cidade" itemValue="#{rFacesCadastroUsuario.estado}"  />
                                                        <f:selectItems value="#{rFacesEstados.all}" var="estados" itemLabel="#{estados.nome}" itemValue="#{estados.codigoest}"  />
                                                    </h:selectOneListbox>
                                                </h:panelGrid>
                                                <h:panelGrid columns="4" cellpadding="5">
                                                    <h:outputText value="Telefone*:" />   
                                                    <p:inputMask value="#{rFacesFornecedor.telefone}" required="false" mask="(99) 9999-9999" />
                                                </h:panelGrid>
                                                
                                            </h:panelGrid>
                                        </p:panel>
                                    </h:panelGrid>  
                                    <p:commandButton value="Salvar" ajax="false" action="#{rFacesFornecedor.save(actionEvent)}" update="growl"/>  
                                    <p:ajaxStatus>  
                                        <f:facet name="start">  
                                            <h:graphicImage value="../design/ajaxloading.gif" />  
                                        </f:facet>  

                                        <f:facet name="complete">  
                                            <h:outputText value="" />  
                                        </f:facet>  
                                    </p:ajaxStatus>  
                                </p:panel> 
                            </div>

                        </h:form>


                    </div>
                    <div id="footer">
                        <hr />
                        <div class="left">
                            Outubro 2011. All rights reserved.<br />Referência: <a href="http://pt.wikipedia.org" target="_blank">Wikipedia</a>            
                        </div>
                        <div class="right">
                            Trabalho final de Projeto Integrador e Modelagem Web
                        </div>
                    </div>
                    <div class="right"></div>
                </div>
            </div>

        </h:form>
    </h:body>
</html>

